<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
    $(function(){
        $('#file_upload').click(function(){

            var data = new FormData();
            var files = $('#file')[0].files;

            if (files) {
                data.append('phote',files[0]);
            }

            $.ajax({
                cache: false,
                type: 'post',
                dataType: 'json',
                url:'upload',
                data : data,
                contentType: false,
                processData: false,
                success : function () {

                }
            });
        });

    })

</script>
<table style='width: 100%;height: 100%'>
    <tr>
        <td style='width:800px;text-align: center;'>
            <input id='file' type="file">
            <input id='file_upload' type="button" value="upload">
        </td>
    </tr>
</table>
</body>
</html>